/************************************************
 * Copyright (c) 2007 ~ 2009, 
 * All rights reserved.
 * Version   : 1.0
 * Author    : lengsh@gmail.com 
 * Date      : 2009.1.2
 ************************************************/


#ifndef __ANTX_ACL_HANDLE_H_
#define __ANTX_ACL_HANDLE_H_

#include <string>
#include <map>
using namespace std;

class clientAcl
{
	private:
		static clientAcl *_instance;
	public:
		static clientAcl *Instance(const char *confFile = NULL);
		static void Release();
		~clientAcl(); 

                bool Check(struct sockaddr_storage * addr);
                void Print();
                void Report_Restart(int rport, int lport);

	protected:
		clientAcl() {   }
		bool init(const char *confFile); 
		int connect_remote_socket(const char *ip, int port );
                string get_in_addr(struct sockaddr_storage *sst, struct sockaddr *sa);

	private:
		map < string, int > m_IPs;

};


#endif
